import 'package:flutter/material.dart';
import 'SingleChildScrollViewDemo.dart';
import 'ListViewDemo.dart';
import 'GridViewDemo.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return MaterialApp(

      home: HomePage(),
    );
  }
}


class HomePage extends StatelessWidget {

  @override
  Widget build(BuildContext context) {
    return Scaffold(

      appBar: AppBar(title: Text('ScrollDemo'),),

      body: Column(

        children: <Widget>[

          RaisedButton(

            onPressed: () {
              Navigator.push(context, MaterialPageRoute(builder: (context) {
                return SingleScrollViewDemo();
              }));
            },

            child: Text('SingleScrollView'),
          ),

          RaisedButton(

            onPressed: (){
              Navigator.push(context, MaterialPageRoute(builder: (c){
                return ListViewDemo();
              }));
            },

            child: Text('ListViewDemo'),
          ),

          RaisedButton(

            onPressed: (){
              Navigator.push(context, MaterialPageRoute(builder: (c){
                return GridViewDemo();
              }));
            },

            child: Text('GridViewDemo'),
          ),
        ],
      ),
    );
  }
}